local pn = ...
return Def.ActorFrame{

		--Red underlay lifebar
		Def.Quad{
			InitCommand=cmd(draworder,999;setsize,322,18;diffuse,color("#750000");cropleft,1);
			OnCommand=cmd(decelerate,1;cropleft,.5);
			LifeChangedMessageCommand=function(self,params)
				if params.Player == pn then	
					local lifeP1 = params.LifeMeter:GetLife();
					self:stoptweening():sleep(.1):decelerate(.2):cropleft(1-lifeP1);
				end;
			end;
		};
		Def.Quad{
			InitCommand=cmd(draworder,999;setsize,322,18;diffuse,color("#FE0000");cropleft,1;faderight,1);
			OnCommand=cmd(decelerate,1;cropleft,.5);
			LifeChangedMessageCommand=function(self,params)
				if params.Player == pn then	
					local lifeP1 = params.LifeMeter:GetLife();
					self:stoptweening():sleep(.1):decelerate(.2):cropleft(1-lifeP1);
				end;
			end;
		};
		
		--White flash
		--[[Def.Quad{
			InitCommand=cmd(draworder,999;setsize,322,18;diffuse,color("#FFFFFF");diffusealpha,0;cropleft,1;);
			OnCommand=cmd(decelerate,1;cropleft,.5);
			LifeChangedMessageCommand=function(self,params)
				if params.Player == pn then	
					local lifeP1 = params.LifeMeter:GetLife();
					self:stoptweening():cropleft(1-lifeP1):diffusealpha(1):linear(.1):diffusealpha(0);
				end;
			end;
		};]]
		
		--Lifebar
		Def.Quad{
			InitCommand=cmd(draworder,999;setsize,322,18;diffuse,color("#FF8805");cropleft,1);
			OnCommand=cmd(decelerate,1;cropleft,.5);
			LifeChangedMessageCommand=function(self,params)
				if params.Player == pn then	
					local lifeP1 = params.LifeMeter:GetLife();
					self:stoptweening():decelerate(.2):cropleft(1-lifeP1);
				end;
			end;
		};
		--FFFB7D
		Def.Quad{
			InitCommand=cmd(draworder,999;setsize,322,18;diffuse,color("#FFFB7D");cropleft,1;faderight,1);
			OnCommand=cmd(decelerate,1;cropleft,.5);
			LifeChangedMessageCommand=function(self,params)
				if params.Player == pn then	
					local lifeP1 = params.LifeMeter:GetLife();
					self:stoptweening():decelerate(.2):cropleft(1-lifeP1);
				end;
			end;
		};
	};